﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace Mundo_3D
{
    class Cielo_Basico
    {
        public Model model { get; protected set; }
        protected Matrix world = Matrix.Identity;

        public Cielo_Basico(Model m)
        {
            model = m;
        }

        public virtual void Update()
        {
        }


        public void Draw(Camara_Basica camera)
        {
            foreach (ModelMesh mesh in model.Meshes)
            {
                foreach (Effect effect in mesh.Effects)
                {
                    effect.Parameters["View"].SetValue(camera.view);
                    effect.Parameters["Projection"].SetValue(camera.projection);
                    //effect.Parameters["Texture"].SetValue(Texture);
                }

                mesh.Draw(SaveStateMode.SaveState);
            }
        }
    }
}
